cmake_minimum_required(VERSION 3.4.1)

#OpenCV
set(OpenCV_STATIC ON)
set(OpenCV_DIR ${OPENCV_HOME}/sdk/native/jni)
find_package (OpenCV REQUIRED)

#Djinni
include_directories(${DJINNI_HOME}/support-lib/jni)
include_directories(app-djinni/cpp)
include_directories(app-djinni/cpp/jni)

#FaceDetector
include_directories(app-core/cpp/core)

# Android
find_library(log-lib log)

# Output
add_library(
	FaceDetector_android SHARED

	app-core/cpp/core/FaceDetector.cpp
	app-core/cpp/FaceDetectorImpl.cpp

	app-djinni/cpp/jni/JniRectangle.cpp
	app-djinni/cpp/jni/JniFaceDetectorWrapper.cpp

	${DJINNI_HOME}/support-lib/jni/djinni_main.cpp
	${DJINNI_HOME}/support-lib/jni/djinni_support.cpp
)

target_link_libraries(FaceDetector_android ${OpenCV_LIBS} ${log-lib})